﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using VeryExtremeArt.Controller;

namespace VeryExtremeArt
{
    public partial class Index : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["username"] != null)
                loggedinUsername.Text = Session["username"].ToString();
        }

        void registerSubmit_Click(object sender, EventArgs e)
        {
            //Member member = new Member();
            //member.Email = email.Text;
            //member.FirstName = firstName.Text;
            //member.LastName = lastName.Text;
            //member.Password = password.Text;
            //member.Points = 0;
            //member.Role = "none";
            //member.SubscriptionPaid = false;
            //member.UserName = username.Text.Trim();
            //RegisterMember(member);
        }

        public void RegisterMember(Member member)
        {
            //using (DataBaseDataContext db1 = new DataBaseDataContext())
            //{
            //    db1.Members.InsertOnSubmit(member);
            //    db1.SubmitChanges();
            //}
            //ArtPieceController c = new ArtPieceController();
            //ArtPiece ap = new ArtPiece();
            //ap.Name = "monalisa";
            //ap.Artist = "picaso";
            //ap.Description = "beautiful";
            //c.InsertArtPiece(ap);
            AuctionController ac = new AuctionController();
            ac.GetCatalogue();
        }
    }
}